//
//  JWNGraduatehead.m
//  koubei
//
//  Created by 李彦宏 on 2018/4/16.
//  Copyright © 2018年 朱圳. All rights reserved.
//

#import "JWNGraduatehead.h"

@implementation JWNGraduatehead

//自定义head初始化方法
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUI];
    }
    return self;
}
//添加子控件
-(void)setUI{
#pragma -mark ————————————搜索UI————————————————————
    UIView *blckV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, Screen_width, 30)];
    blckV.backgroundColor=[UIColor blackColor];
    [self.contentView addSubview:blckV];
    
    UIButton *addbut=[[UIButton alloc]init];
    addbut.frame=CGRectMake(5, 2, Screen_width/2-20, 26);
    [addbut setImage:[UIImage imageNamed:@"teac-g-add"] forState:UIControlStateNormal];
    [addbut setTitle:@"添加研究生" forState:UIControlStateNormal];
    [addbut setTitleColor:dominantColor forState:UIControlStateNormal];
    [addbut setBackgroundColor:[UIColor blackColor]];
    self.AddGreduBtn=addbut;
    [blckV addSubview:addbut];
    
    UIButton *lbtn = [[UIButton alloc]init];
    [lbtn setFrame:CGRectMake(Screen_width/2, 3, Screen_width/2-10, 24)];
    lbtn.backgroundColor=[UIColor whiteColor];
    lbtn.layer.cornerRadius=5;
    [lbtn setTitle:@"研究生" forState:UIControlStateNormal];
    UIImage *image=[UIImage imageNamed:@"searchbar_textfield_search_icon"];
    [lbtn setImage:image forState:UIControlStateNormal];
    [lbtn setTitleEdgeInsets:UIEdgeInsetsMake(0,-100, 0,image.size.width)];
    [lbtn setImageEdgeInsets:UIEdgeInsetsMake(0, 100, 0, 0)];
    self.ShearBtn=lbtn;
    [lbtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    
    [blckV addSubview:lbtn];
#pragma -mark ———————————研究生头UI————————————————————
    UILabel *lb2=[[UILabel alloc] init];
    [lb2 setBackgroundColor:[UIColor clearColor]];
    [lb2 setTextColor:[UIColor blackColor]];
    [lb2 setFont:[UIFont systemFontOfSize:15]];
    lb2.textAlignment=NSTextAlignmentCenter;
    lb2.text=@"姓名";
    [self.contentView addSubview:lb2];
    lb2.frame = CGRectMake(15, 37, 40, 30);
    
    UILabel *lb3=[[UILabel alloc] init];
    [lb3 setBackgroundColor:[UIColor clearColor]];
    [lb3 setTextColor:[UIColor blackColor]];
    [lb3 setFont:[UIFont systemFontOfSize:15]];
    lb3.textAlignment=NSTextAlignmentCenter;
    lb3.text=@"院校及专业";
    [self.contentView addSubview:lb3];
    lb3.frame = CGRectMake(80, 37, ScreenWidth-95, 30);
    
    
}



@end
